package com.biz.primus.ms.tms.trans;


import com.biz.primus.model.tms.vo.UpgradeRespVo;
import com.biz.primus.ms.tms.dao.po.UpgradePo;
import com.google.common.base.Function;

import java.io.Serializable;

/**
 * @author: liubin
 * @date 2/21/17 14:20
 */
public class UpgradePoToUpgradeResVo implements Function<UpgradePo, UpgradeRespVo>, Serializable {

    private static final long serialVersionUID = 4167781022315582589L;

    @Override
    public UpgradeRespVo apply(UpgradePo input) {
        UpgradeRespVo vo = new UpgradeRespVo();
        if (input != null) {
            vo.setNeed(true);
            vo.setForce(input.getIsForce());
            vo.setInfo(input.getInfo());
            vo.setUrl(input.getUrl());
            vo.setVersion(input.getVersion());
            return vo;
        }
        return null;
    }
}
